﻿@model RazzzorTest.Models.New
@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    Create</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.wysiwyg.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <div class="editor-label">
        @Html.LabelFor(model => model.Title)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Title)
        @Html.ValidationMessageFor(model => model.Title)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Content)
    </div>
    <div class="editor-field">
        @Html.TextAreaFor(model => model.Content, new { id = "newsContent" })
        @Html.ValidationMessageFor(model => model.Content)
    </div>
    <p>
        <input type="submit" value="Zapisz" />
    </p>
}
<script type="text/javascript">
    $(document).ready(function () { $('#newsContent').wysiwyg(); });
</script>
<div>
    @Html.ActionLink("Lista publikacji", "Index")
</div>
